package com.qianqutech.plugin.captcha.captchaUtil.level;

/**
 * Created by vip8 on 2017/9/30.
 */
public enum Level {

    getSIMPLE(10001,getSimple()),
    getMEDIUM(10002, getMedium()),
    getHARD(10002, getHard()),
    ;
    /** 描述：状态码*/
    private Integer code;
    /** 描述：状态描述*/
    private String info;
    Level(Integer code,  String info){
        this.code = code;
        this.info = info;
    }

    /** 描述：获取状态码*/
    public Integer getCode() {
        return code;
    }

    /** 描述：获取状态描述*/
    public String getInfo() {
        return info;
    }

    /** 描述：设置状态描述*/
    public void setInfo(String info) {
        this.info = info;
    }



    public static String getSimple(){
        char [] SIMPLE = {'0','1','2','3','4','5','6','7','8','9'};
        return String.valueOf(SIMPLE);
    }

    public static String getMedium(){
        char [] MEDIUM = {'a','b','c','d','e','f','g','h','i','j','k','l','m',
                'n','o','p','q','r','s','t','u','v','w','x','y','z',
                'A','B','C','D','E','F','G','H','I','J','K','L','M',
                'N','O','P','Q','R','S','T','U','V','W','Z','Y','Z'};
        return String.valueOf(MEDIUM);
    }

    public static String getHard(){
        char [] HARD = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d',
                'e','f','g','h','i','j','k','l','m','n','o','p','q','r',
                's','t','u','v','w','x','y','z','A','B','C','D','E','F',
                'G','H','I','J','K','L','M','N','O','P','Q','R','S','T',
                'U','V','W','Z','Y','Z'};
        return String.valueOf(HARD);
    }
}
